<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>用户中心_{$web_name}</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="Keywords" content="用户中心" />
	<meta name="Description" content="用户中心" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
	<meta name="format-detection" content="telephone=no">
	<tc_include file="Public:head" />
	<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/User/css/user.css" />
	<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/User/css/user_common.css" />
	<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/User/css/order.css" />
	<style type="text/css">
		.user-right .tabmenu {
			margin-bottom: 0;
		}
	</style>
</head>

<body>

<tc_include file="Public:nav" />
<div class="w990 content" id="content" style="background: none;">
	<div class="margin-w1210 clearfix">
		<div class="w">
			<div class="breadcrumb clearfix">
				<a href="/" class="index">首页</a> <span class="crumbs-arrow">&gt;</span> <span class="last">我的众筹</span></div>
		</div>
		<div class="blank"></div>
		<tc_include file="Public:user_left" />
		<div class="user-right  con-right">
			<div class="con-right-text">
				<php>$staus=I('get.stauts',0);</php>
				<div class="tabmenu">
					<div class="user-status">
								<span class="user-statu <eq name='staus' value='0'>active</eq>">
									<a id="order_all" class="tabs-" href="{:U('User/crowdfunding',array('stauts'=>1))}">
									<span>已支付</span>
								<em class="tag-em">{$ccount}</em>
								<span class="vertical-line">|</span>
								</a>
								</span>
						<span class="user-statu <eq name='staus' value='1'>active</eq>">
									<a id="order_unpayed" class="tabs-" href="{:U('User/crowdfunding',array('stauts'=>2))}">
									<span>未支付</span>
								<em class="tag-em">{$wcount}</em>
								<span class="vertical-line">|</span>
								</a>
								</span>
					</div>

				</div>
				<div class="alert alert-success">
					<h4>操作提示：</h4>
					<ul>
						<li>您可对已支持项目进行操作付款,取消，确认收货等操作，订单超过24小时未付款，系统将自动取消。</li>
					</ul>
				</div>
				<div class="content-info">
					<div class="content-list order-list">
						<div id="table_list">
							<table class="table">
								<colgroup>
									<col style="width: 38%;">
									<col style="width: 10%;">
									<col style="width: 7%;">
									<col style="width: 20%;">
									<col style="width: 13%;">
									<col style="width: 12%;">
								</colgroup>
								<thead>
								<tr>
									<th class="" style="cursor: default;">宝贝</th>
									<th>单价（元）</th>
									<th>数量</th>
									<th >金额（元）</th>
									<th>交易状态</th>
									<th>交易操作</th>
								</tr>
								</thead>

							</table>
							<foreach name="order_list" item="vo">
								<div class="trade-order">
									<table class="trade-order-goods">
										<colgroup>
											<col style="width: 38%;">
											<col style="width: 10%;">
											<col style="width: 10%;">
											<col style="width: 20%;">
											<col style="width: 12%;">
											<col style="width: 10%;">
										</colgroup>
										<php>$shop_list=get_order_shop($vo['order_id']);</php>
										<foreach name="shop_list" item="v" key="k">
											<tbody>
											<eq name="k" value="0">
												<tr class="trade-order-info">
													<td colspan="1">
														<label><span style="">{:date('Y-m-d H:i:s',$vo['add_time'])}</span></label>
														<span>订单号：</span>
														<span>{$vo['order_sn']}</span>

													</td>
													<td colspan="5">
														<a href="{:U('store/index',array('id'=>$vo['store_id']))}" title="{$vo['store_name']}" target="_blank" class="shop-name">{$vo['store_name']}</a>
													</td>
													<td class="order-recycle-bin">
													</td>
												</tr>
											</eq>
											<tr>
												<td class="goods-info">

													<div style="overflow: hidden;">
														<a class="goods-img" href="{:U('shop/index',array('id'=>$v['goods_id']))}" target="_blank">
															<img src="{$v['goods_image']}">
														</a>
														<div class="item-con">
															<div class="item-name">
																<a href="{:U('shop/index',array('id'=>$v['goods_id']))}" target="_blank">
																	<span>{$v['goods_name']}</span>
																</a>

															</div>

															<div class="item-props">
																			<span class="sku">
																				<notempty name="v['goods_sku_spec']">规格：{$v['goods_sku_spec']}</notempty>
																				<notempty name="v['goods_sku_style']">颜色：{$v['goods_sku_style']}</notempty>

																			</span>
															</div>

															<div class="item-icons">

															</div>
														</div>
													</div>
												</td>
												<td class="goods-price">
													<p class="second-color">{$v['goods_price']}</p>
												</td>
												<td class="goods-num">{$v['goods_num']}</td>

												<!--<td class="goods-operate" >
													<eq name="k" value="0">
														<div class="goods_desc last">
															<div style="min-width: 85px;">

																<php>
																	$time=time();
																	if($vo['finnshed_time']){
																	$endtime=$vo['finnshed_time']+60*60*24*7;
																	}else{
																	$endtime=$time+60*60*24*7;
																	}

																	if($vo['order_state']>10&&$endtime>$time&&$vo['refund_state']==0){
																</php>
																<a href="{:U('user/refunddetail',array('order_id'=>$vo['order_id']))}" style="border: 1px solid #0689e1;padding: 4px 7px;color: #0689e1;line-height: 45px;">
																	退款/退货
																</a>
																<php>
																	}
																</php>
																<gt name="vo['refund_state']" value="0">
																	<eq name="vo['refund_state']" value="5">
																		<a href="{:U('user/refunddetail',array('order_id'=>$vo['order_id']))}" style="border: 1px solid #0689e1;padding: 4px 7px;color: #0689e1;line-height: 45px;">
																			退款/货完成
																		</a>
																	</eq>
																	<eq name="vo['refund_state']" value="4">
																		<a href="{:U('user/refunddetail',array('order_id'=>$vo['order_id']))}" style="border: 1px solid #0689e1;padding: 4px 7px;color: #0689e1;line-height: 45px;">
																			等待客服打款
																		</a>
																	</eq>
																	<eq name="vo['refund_state']" value="3">
																		<a href="{:U('user/refunddetail',array('order_id'=>$vo['order_id']))}" style="border: 1px solid #0689e1;padding: 4px 7px;color: #0689e1;line-height: 45px;">
																			商家拒绝
																		</a>
																	</eq>
																	<eq name="vo['refund_state']" value="1">
																		<a href="{:U('user/refunddetail',array('order_id'=>$vo['order_id']))}" style="border: 1px solid #0689e1;padding: 4px 7px;color: #0689e1;line-height: 45px;">
																			退款中
																		</a>
																	</eq>


																</gt>

															</div>
														</div>
													</eq>
												</td>-->

												<php>
													$youhui_price=get_coupon_price($vo['buyer_id'],$vo['coupon']);
												</php>
												<td class="goods-payment" >
													<eq name="k" value="0">
														<p>
															总金额：
															<b>￥{$vo['order_amount']}</b>
														</p>
														<eq name="vo['order_state']" value="10">
															<p>
																待付款：
																<strong class="second-color">￥{$vo['order_amount']-$vo['daiyan_sale']-$youhui_price}</strong>
															</p>
														</eq>
														<p>
															<span>(运费：￥{$vo['shipping_fee']})</span>
														</p>
														<php>if($youhui_price||$vo['daiyan_sale']>0){</php>
														<p>
															<span>(优惠：￥{$youhui_price+$vo['daiyan_sale']})</span>
														</p>
														<php>}</php>
														<p>
															<span>{$vo['payment_code']}</span>
														</p>
													</eq>
												</td>
												<php>
													if($vo['tuanselect']==1){
													if($vo['tuan_is_first_id']==0){
													$num=get_tuan($vo['order_id']);
													}else{
													$num=get_tuan($vo['tuan_is_first_id']);
													}

													}
												</php>

												<td class="trading-status" >

													<eq name="k" value="0">
														<eq name="vo['refund_state']" value="0">
															<eq name="vo['order_state']" value="10">
																<div class="operate">
																	<a target="_blank">等待买家付款</a>
																</div>
															</eq>
															<eq name="vo['order_state']" value="20">
																<eq name="vo['refund_state']" value="0">
																	<div class="operate">
																		<a target="_blank">等待卖家发货</a>
																	</div>
																</eq>

															</eq>
															<eq name="vo['order_state']" value="30">
																<div class="operate">
																	<a target="_blank">等待买家收货</a>
																</div>
															</eq>
															<eq name="vo['order_state']" value="40">
																<eq name="vo['evaluation_state']" value="0">
																	<div class="operate">
																		<a target="_blank" href="{:U('user/reviewcommodity',array('id'=>$vo['order_id']))}">待评价</a>
																	</div>
																</eq>
																<eq name="vo['evaluation_state']" value="1">
																	<div class="operate">
																		<a target="_blank" href="{:U('user/reviewagain',array('id'=>$vo['order_id']))}">可追加评价</a>
																	</div>
																</eq>
																<eq name="vo['evaluation_state']" value="2">
																	<div class="operate">
																		<a href="javascript:;">交易完成</a>
																	</div>
																</eq>
															</eq>
															<div class="operate">
																<a href="{:U('user/order_info',array('id'=>$vo['order_id'],'cid'=>$vo['crowdfunding_id']))}">订单详情</a>
															</div>
														</eq>
														<neq name="vo['refund_state']" value="0">
															<eq name="vo['order_state']" value="40">
																<eq name="vo['evaluation_state']" value="0">
																	<div class="operate">
																		<a target="_blank" href="{:U('user/reviewcommodity',array('id'=>$vo['order_id']))}">待评价</a>
																	</div>
																</eq>
																<eq name="vo['evaluation_state']" value="1">
																	<div class="operate">
																		<a target="_blank" href="{:U('user/reviewagain',array('id'=>$vo['order_id']))}">可追加评价</a>
																	</div>
																</eq>

															</eq>
															<eq name="vo['refund_state']" value="1">
																<div class="operate">
																	<a target="_blank">退款中</a>
																</div>
															</eq>
															<eq name="vo['refund_state']" value="2">
																<div class="operate">
																	<a target="_blank">同意退换货</a>
																</div>
															</eq>
															<eq name="vo['refund_state']" value="3">
																<div class="operate">
																	<a target="_blank">拒绝退换货</a>
																</div>
															</eq>
															<eq name="vo['refund_state']" value="4">
																<div class="operate">
																	<a target="_blank"> 等待客服打款</a>
																</div>
															</eq>
															<eq name="vo['refund_state']" value="5">
																<div class="operate">
																	<a target="_blank"> 退换货完成</a>
																</div>
															</eq>
															<div class="operate">
																<a href="{:U('user/order_info',array('id'=>$vo['order_id'],'cid'=>$vo['crowdfunding_id']))}">订单详情</a>
															</div>
														</neq>
													</eq>
												</td>

												<td class="trading-operate" >
													<eq name="k" value="0">
														<eq name="vo['refund_state']" value="0">
															<eq name="vo['order_state']" value="0">
																<div class="operate" style="color: red;">已取消</div>
																<div class="operate" ><a href="{:U('shop/index',array('id'=>$v['goods_id']))}">再次购买</a></div>
															</eq>
															<eq name="vo['order_state']" value="10">
																<div class="operate">
																	<a href="{:U('pay/paychoose',array('order_cn'=>$vo['order_sn']))}" target="_blank" class="on-payment">立即付款</a>
																</div>
																<div class="operate">
																	<a class="cancel-payment edit-order" href="{:U('user/close_order',array('order_sn'=>$vo['order_sn']))}">取消订单</a>
																</div>
															</eq>
															<eq name="vo['order_state']" value="20">
																<div class="operate">
																	<eq name="vo['refund_state']" value="0">
																		<a href="javascript:;"  class="on-payment">等待发货</a>
																	</eq>
																</div>
															</eq>
															<eq name="vo['order_state']" value="30">
																<div class="operate">
																	<a href="javascript:;"  class="on-payment confirm_order" data="{$vo['order_id']}">确认收货</a>
																</div>
															</eq>
															<eq name="vo['order_state']" value="40">
																<eq name="vo['evaluation_state']" value="0">
																	<div class="operate">
																		<a href="{:U('user/reviewcommodity',array('id'=>$vo['order_id']))}"  class="on-payment">立即评价</a>
																	</div>
																</eq>
																<eq name="vo['evaluation_state']" value="1">
																	<div class="operate">
																		<a href="{:U('user/reviewagain',array('id'=>$vo['order_id']))}"  class="on-payment">追加评价</a>
																	</div>
																</eq>
															</eq>
														</eq>
														<neq name="vo['refund_state']" value="0">
															<eq name="vo['order_state']" value="40">
																<eq name="vo['evaluation_state']" value="0">
																	<div class="operate">
																		<a target="_blank" href="{:U('user/reviewcommodity',array('id'=>$vo['order_id']))}">待评价</a>
																	</div>
																</eq>
																<eq name="vo['evaluation_state']" value="1">
																	<div class="operate">
																		<a target="_blank" href="{:U('user/reviewagain',array('id'=>$vo['order_id']))}">可追加评价</a>
																	</div>
																</eq>

															</eq>
															<eq name="vo['refund_state']" value="1">
																<div class="operate">
																	<a target="_blank">退款中</a>
																</div>
															</eq>
															<eq name="vo['refund_state']" value="2">
																<div class="operate">
																	<a target="_blank">同意退换货</a>
																</div>
															</eq>
															<eq name="vo['refund_state']" value="3">
																<div class="operate">
																	<a target="_blank">拒绝退换货</a>
																</div>
															</eq>
															<eq name="vo['refund_state']" value="4">
																<div class="operate">
																	<a target="_blank"> 等待客服打款</a>
																</div>
															</eq>
															<eq name="vo['refund_state']" value="5">
																<div class="operate">
																	<a target="_blank"> 退换货完成</a>
																</div>
															</eq>

														</neq>
													</eq>
												</td>

											</tr>
										</foreach>
										</tbody>

									</table>
								</div>
							</foreach>
							<empty name="order_list">
								<style>
									/*空记录的展示*/
									.tip-box{ width: 1000px; height: 300px; margin: 50px auto 0; text-align: center;}
									.tip-box .tip-icon{ display: block; max-width: 100%; max-height: 100%; margin: 0 auto;}
									.tip-box .tip-text{ line-height: 20px; padding: 10px; font-size: 14px;}
									.tip-box .tip-text p{ height: 40px; line-height: 40px;}

								</style>
								<div class="tip-box">
									<img src="/themes/wnsc/Home/List/images/noresult.png" class="tip-icon">
									<div class="tip-text">没有符合条件的记录</div>
								</div>
							</empty>
							<!--分页-->
							<style type="text/css">
								#pagination a {
									padding: 3px 9px;
									border: 1px solid #988f8f;
									margin-right: 3px;
								}

								#pagination span {
									padding: 3px 9px;
									border: 1px solid #988f8f;
									margin-right: 3px;
									background: red;
									color: #fff;
								}
								.current{border: 1px solid red!important;}
							</style>
							<div class="page">
								<div class="page-wrap fr">
									<div id="pagination" class="pull-right page-box">

										<div id="pagination" class="page page-wrap fr">
											{$page}

										</div>
									</div>
								</div>
							</div>

						</div>

					</div>
				</div>
			</div>
		</div>

	</div>
</div>
<div style="clear: both;"></div>

<tc_include file="Public:footer" />
<script type="text/javascript">
    $(function(){
        $('.confirm_order').click(function(){
            var order_id=$(this).attr("data");

            $.ajax({
                type:"post",
                url:"{:U('user/confirm_order')}",
                data:{'order_id':order_id},
                async:true,
                success:function(data){
                    if(data.code==1){
                        layer.msg(data.message)
                        setTimeout('window.location.href="{:U('User/crowdfunding',array('stauts'=>1))}"',1000);
                    }
                    if(data.code==0){
                        layer.msg(data.message)
                    }
                }
            });
        })
    })
</script>
</body>

</html>